1. Field of the Invention
The present invention relates to code debugging and more particularly to heap dump analysis during debugging of an application.
2. Description of the Related Art
The art of software development extends far beyond a mere coding of a functional specification for a computer program. Modern software development conforms to a lifecycle which begins with the functional specification leading into the formulation of a suitable architecture for an application implementing the functional specification. The lifecycle continues with the physical coding of the application and includes iterative testing and debugging cycles to ensure the integrity of the code. Finally, the execution of the debugged code can be analyzed to facilitate the further revision of the code to improve the performance of the code.
Core dumping has always been integral to debugging a failed computing application. In computing, a core dump generally includes the recorded state of the working memory of a failed computer program at a specific time, generally when the program terminated abnormally. In practice, other important elements of program state are dumped at the same time into the same file, including the processor registers, which may include the program counter and stack pointer, memory management information, and other processor and operating system flags and information. On many operating systems, a fatal error occurring during program execution automatically triggers a core dump.
The heap dump, as a species of the core dump, remains an integral part of the debugging process—particularly with respect to the Java™ virtual machine. A heap dump, as it is well known in the art, pertains to the automated listing of the content of the dynamic memory responsive to an out of memory condition resulting in an application crash. In the Java programming environment, for example, a head dump arises responsive to a pre-set preference in the Java virtual machine (JVM) and the occurrence of a OutOfMember exception. Alternatively, a heap dump can be manually provoked using the “jmap” tool. In either circumstance, the resultant file can be unintelligible without the assistance of a heap dump analysis tool.
The “Heap Analysis Tool” (HAT) distributed with the Java standard edition is a software tool providing a user interface through which a heap dump file can be browsed. The most recent form of HAT even permits the execution of queries against a loaded heap dump file. HAT largely provides assistance in debugging memory leaks (also known as object retention issues). Even still, because the Java environment does not expose physical memory addresses in a heap dump, correlating structures in a heap dump to program code creating or manipulating those structures can be complicated. By way of example, objects created thread local are fields in a class, however, thread local objects do not necessarily appear as fields in a class in a heap dump. Thus, for the debugger, determining the class that initialized a thread local object from a heap dump can be difficult and oftentimes not possible.